
/******************************************************************************
 *
 * jattbak - TODO
 *
 * Author:        Dennis Krzyzaniak
 * E-mail:        ebrosius@netgarage.org
 * Copyright (C): 2011 by Dennis Krzyzaniak
 *
 * This file is part of jattbak.
 *
 * jattbak is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * jattbak is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with jattbak.  If not, see <http://www.gnu.org/licenses/>.
 *
 *****************************************************************************/


#ifndef __JATTBAK_TEST_H__
#define __JATTBAK_TEST_H__

/* =========== INCLUDES ==================================================== */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <assert.h>

/* =========== DEFINES ===================================================== */

#define baseTest(cond, failCnt) \
   ((cond) ? (void)0 : (void)baseTest_(#cond, __FILE__, __LINE__, failCnt))

/* =========== DATA TYPES ================================================== */

typedef int (*testFunc_p)(void);

/* =========== PUBLIC PROTOTYPES =========================================== */

/*---------------------------------------------------------------------------*/
void
baseTest_(
      const char* condString,
      const char* fileName,
      const int lineNr,
      int* const failCnt
      );
/*---------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------*/
int
baseRunTest(
      testFunc_p func,
      const char* name
      );
/*---------------------------------------------------------------------------*/

#endif /* __JATTBAK_TEST_H__ */

/* ========================== END OF FILE ================================== */

/*
 * vim settings, please do not remove!
 * vim:autoindent:filetype=c:syntax=c:
 * vim:ts=3:sw=3:sts=3:expandtab:cindent:tw=75:formatoptions=croql:
 * vim600:foldmethod=syntax:
 */

